package com.cap.bts.crmdp.dealer.remind.domain;

import java.io.Serializable;

import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

import com.cap.bts.framework.common.domain.BaseDomain;
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
@Entity
@Table(name="tm_raw_custom_promotion")
@AttributeOverrides({
    @AttributeOverride(name="createBy", column=@Column(name="CREATE_BY")),
    @AttributeOverride(name="createDate", column=@Column(name="CREATE_DATE", nullable = false)),
    @AttributeOverride(name="lastUpdateBy", column=@Column(name="LAST_UPDATE_BY")),
    @AttributeOverride(name="lastUpdateDate", column=@Column(name="LAST_UPDATE_DATE"))
})
public class CustomPromotion extends BaseDomain implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	private Long id;
	private Long dealerId;
	private String maintenanceType;
	private String promotionalContent;
	private Long periodOfValidity;
	private String timeUnit;
	
	@Id
    @GeneratedValue(strategy=GenerationType.AUTO)
	public Long getId() {
		return id;
	}
	public void setId(Long id) {
		this.id = id;
	}
	@Column(name="dealer_id")
	public Long getDealerId() {
		return dealerId;
	}
	public void setDealerId(Long dealerId) {
		this.dealerId = dealerId;
	}
	
	@Column(name="maintenance_type")
	public String getMaintenanceType() {
		return maintenanceType;
	}
	public void setMaintenanceType(String maintenanceType) {
		this.maintenanceType = maintenanceType;
	}
	
	@Column(name="promotional_content")
	public String getPromotionalContent() {
		return promotionalContent;
	}
	public void setPromotionalContent(String promotionalContent) {
		this.promotionalContent = promotionalContent;
	}
	
	@Column(name="period_of_validity")
	public Long getPeriodOfValidity() {
		return periodOfValidity;
	}
	public void setPeriodOfValidity(Long periodOfValidity) {
		this.periodOfValidity = periodOfValidity;
	}
	
	@Column(name="time_unit")
	public String getTimeUnit() {
		return timeUnit;
	}
	public void setTimeUnit(String timeUnit) {
		this.timeUnit = timeUnit;
	}
}
